
import service from '@/utils/request'

// 登录
export const login = (data: any) => {
  return service.post('/auth/login', data, { showErrorAlert: false })
}

// 登出
export const logout = () => {
  return service.delete('/auth/logout')
}

// 获取用户信息、权限列表
export const getUserInfo = () => {
  return service.get(`/system/user/info`)
}

// 刷新token
export const postRefreshToken = (RefreshToken: string) => {
  return service.post(`/system/token/refresh`, null, { headers: { RefreshToken } })
}

// 修改密码
export const modifyPassword = (data: any) => {
  return service.post(`/system/user/password/update`, data)
}

// 获取rtc视频流ip地址
export const getRtcIP = () => {
  return service.get('/monitor/equipment/get/webrtc/url')
}

